//
//  VCOfSecond.m
//  UI08_页面间传值
//
//  Created by Scott on 16/3/18.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "VCOfSecond.h"

@interface VCOfSecond ()

@property (nonatomic, retain) UILabel *labelOfUser;

@property (nonatomic, retain) UIButton *buttonOfBack;

@end

@implementation VCOfSecond

- (void)dealloc {
    [_content release];
    [_labelOfUser release];
    [_buttonOfBack release];
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self createSubviews];
}

- (void)createSubviews {
    
    self.labelOfUser = [[UILabel alloc] initWithFrame:CGRectMake(20, 80, 300, 40)];
    self.labelOfUser.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:self.labelOfUser];
    [_buttonOfBack release];
    
    // 赋值.
    self.labelOfUser.text = self.content;
    
    
    self.buttonOfBack = [UIButton buttonWithType:UIButtonTypeSystem];
    
    self.buttonOfBack.frame = CGRectMake(50, 200, self.view.frame.size.width - 100, 40);
    
    [self.buttonOfBack setTitle:@"Back" forState:UIControlStateNormal];
    
    [self.view addSubview:self.buttonOfBack];
    
    self.buttonOfBack.backgroundColor = [UIColor yellowColor];
    
    [self.buttonOfBack addTarget:self action:@selector(handleBack:) forControlEvents:UIControlEventTouchUpInside];
    

}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
